/*
 * Copyright (c) 2016- 2020 qolome.com Inc. All Rights Reserved.
 * ProjectName: qolome-knowledge
 * FileName: Employee.java
 * Author: jiangfeng@qolome.com
 * Date: 2020/3/13 下午1:33
 * LastModified: 2020/03/13 13:33:13
 */

package com.qolome.knowledge.design.pattern.delegate.demo.simple;

import com.sun.applet2.AppletParameters;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Qolome
 * @version V1.0
 * @Description 领导
 * @date 2020年 03月13日 13:33:20
 */
@Slf4j
public class Leader implements IEmployee {

    private final  static  Map<String,IEmployee> employeeMap = new HashMap<>();

    static{
        employeeMap.put("Java",new EmpA());
        employeeMap.put("Python",new EmpB());
    }


    @Override
    public void doing(String task){
        employeeMap.put("手机",new EmpB());
        if (employeeMap.containsKey(task)){
            employeeMap.get(task).doing(task);
            return;
        }
        log.info("无法执行任务:{}超出能力范围",task);



    }
    
}
